/*
 * @Descripttion:
 * @version:
 * @Author: sueRimn
 * @Date: 2020-11-16 10:35:34
 * @LastEditors: sueRimn
 * @LastEditTime: 2020-11-17 17:01:24
 */
import request from '@/utils/request'
import store from '@/store/index'
const base = require('../../env/index')

// 夹带k_token
function addK_Token(data) {
    var token = {
        k_token: store.getters.k_token
    }
    Object.assign(data, token)
    return data
}
export function saveTeacher(data) {
    return request({
        url: base.permission_url + '/api/v1/admin/teacher/save',
        method: 'POST',
        headers: {},
        data: addK_Token(data)
    })
}
export function addTeacher(data) {
    return request({
        url: base.permission_url + '/api/v1/admin/teacher/add',
        method: 'POST',
        headers: {},
        data: addK_Token(data)
    })
}
export function addExperience(data) {
    return request({
        url: base.permission_url + '/api/v1/admin/teacher/add/experience',
        method: 'POST',
        headers: {},
        data: addK_Token(data)
    })
}
export function addResults(data) {
    return request({
        url: base.permission_url + '/api/v1/admin/teacher/add/results',
        method: 'POST',
        headers: {},
        data: addK_Token(data)
    })
}
export function addCharacteristics(data) {
    return request({
        url: base.permission_url + '/api/v1/admin/teacher/add/characteristics',
        method: 'POST',
        headers: {},
        data: addK_Token(data)
    })
}
export function getTeacherById(data) {
    return request({
        url: base.permission_url + '/api/v1/admin/teacher/info/' + data.id,
        method: 'POST',
        headers: {},
        data: addK_Token(data)
    })
}
export function firedTeacher(data) {
    return request({
        url: base.permission_url + '/api/v1/admin/fired/save',
        method: 'POST',
        headers: {},
        data: addK_Token(data)
    })
}
